<template>
	<view>
		<view class="container">
			<view class="form">
				<view class="input-group"><text class="title">登录</text></view>
				<view class="input-group">
				<input class="input" v-model="username" placeholder="请输入用户名"/></view>
				<view class="input-group">
				<input class="input" v-model="password" placeholder="请输入密码"/></view>
				<button class="btn" type="primary" @click="handleLogin">登录</button>
				<view class="link">
					<text>没有账号？</text>
					<navigator url="/pages/tabBar/demos/Logon/Register/Register"  ><text class="text-blue">去注册</text></navigator>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				username: '',
				password: ''
			}
		},
		methods: {
			handleLogin(){
				if(!this.username || !this.password){
					uni.showToast({
						title:'请输入完整信息',
						icon:'none'
					})
					return
				}
				uni.switchTab({
					url:"/pages/tabBar/demos/cardview/cardview"
				})
			}
		}
	}
</script>

<style>

</style>
